package com.ibiaoke.boss.controller;

import com.ibiaoke.common.configs.GlobalConfigs;
import com.ibiaoke.common.configs.GlobalConfigsKey;
import com.ibiaoke.common.response.Res;
import com.ibiaoke.system.service.QiNiuServiceImpl;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.math.BigDecimal;

/**
 * Created by huhaichao on 2017/6/14.
 */
@Controller
public class QiNiuController {

    @RequestMapping("qiniuToken")
    @ResponseBody
    public Res qiniuToken(){
        QiNiuServiceImpl qiNiuService = new QiNiuServiceImpl();
        Res res = qiNiuService.getToken(GlobalConfigs.getConfigure(GlobalConfigsKey.QiNiu.ACCESS_KEY), GlobalConfigs.getConfigure(GlobalConfigsKey.QiNiu.ACCESS_SECRET), GlobalConfigs.getConfigure(GlobalConfigsKey.QiNiu.BUCKET_NAME));
        return res;
    }

}
